package com.itheima.springboot;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
import redis.clients.jedis.Jedis;

import java.util.Map;

@SpringBootApplication
//@Import(UserConfig.class)
//@ComponentScan("com.itheima.config")
//@EnableUser


//@Import(User.class)
//@Import(UserConfig.class)
//@Import(MyImportSelector.class)
public class SpringbootenableBeanApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(SpringbootenableBeanApplication.class, args);
       /* Object user = context.getBean(User.class);
        System.out.println(user);*/
        //User user = context.getBean(User.class);
//        Map<String, User> map = context.getBeansOfType(User.class);
        // System.out.println(user);
        //  System.out.println(map);
        Jedis bean = context.getBean(Jedis.class);
        System.out.println(bean);
    }

}
